package com.welsy.classroom.business
{
	import mx.rpc.IResponder;
	import mx.rpc.soap.WebService;
	import mx.rpc.AbstractOperation;
	import mx.rpc.AsyncToken;
	import com.adobe.cairngorm.business.ServiceLocator;
	
	public class GetAllEditingClassroomDelegate
	{
		
		private var responder : IResponder;
		private var service : Object;
		
		public function GetAllEditingClassroomDelegate(responder : IResponder) {
			this.responder = responder;
			this.service = ServiceLocator.getInstance().getWebService("ClassroomServices") as WebService;
		}
		
		public function getEditingClassroom(authorId : int) : void {
			var op : AbstractOperation = service.getOperation("GetAllEditingClassroom");
			op.arguments.GetAllEditingClassroomRequest.AuthorId = authorId;
			
			var token : AsyncToken = service.GetAllEditingClassroom();
			token.addResponder(responder);
		}
	}
}